<template>
  <BaseControlTemplate
    class="flex-start"
    :new-params="newParams"
    :page-view-mode="pageViewMode"
    :readonly="readonly"
    :model-value="modelValue"
    :validate-error="validateError"
    :save-dialog-config="saveDialogConfig"
  >
    <template>
      <div v-if="pageViewMode === 'print'" class="printDiv">
        {{ modelValue2 }}
      </div>
      <el-input
        v-else
        v-model="modelValue2"
        type="textarea"
        :autosize="autosize"
        :readonly="pageViewMode !== 'runtime' || readonly"
        :placeholder="newParams.placeholder"
        @blur="validateRequired"
      ></el-input>
    </template>
  </BaseControlTemplate>
</template>

<script>
import mixin from "../../mixins/vue.js";
export default {
  name: "ControlTextArea",
  mixins: [mixin],
  data() {
    return {
      newParams: {},
      autosize: {
        minRows: 2,
      },
    };
  },
};
</script>
